<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<table border="1" cellpadding="0" cellspacing="0">
			<tr>
				<td>标题</td>
				<td>栏目</td>
				<td>状态</td>
				<td>发布人</td>
				<td>点击量</td>
			</tr>
			
		</table>
		
		<script type="text/javascript">
			//获取table对象
			let table = document.getElementsByTagName('table')[0];
			table.innerHTML  =  table.innerHTML + `
			<tr>
				<td>买车时选低配车还是高配车</td>
				<td>汽车</td>
				<td>开放浏览</td>
				<td>小莱</td>
				<td>1000</td>
			</tr>
			<tr>
				<td>专访库里，用正确的方式终结比赛</td>
				<td>汽车</td>
				<td>开放浏览</td>
				<td>小莱</td>
				<td>1000</td>
			</tr>
			`;
			
			let tr2 = document.getElementsByTagName('tr')[1];
			tr2.style.backgroundColor = 'gainsboro';
			let tr3 = document.getElementsByTagName('tr')[2];
			tr3.style.backgroundColor = 'greenyellow'
		</script>
	</body>
</html>
